-
Notifications
You must be signed in to change notification settings - Fork 62
Snowflake #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snowflake #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request performs a major restructuring of the repository, reorganizing the codebase into versioned implementations (version_1 and version_2) while removing the previous frontend and core directories. The PR focuses on Snowflake-based deployment configurations and documentation.
Key changes:
- Complete removal of the Node.js/React frontend and Python backend core
- Addition of version_1 with basic Snowflake Streamlit implementation
- Addition of version_2 with advanced Snowflake Native App configuration
- Updated README to reflect the new Snowflake-focused architecture
- Modified CI workflow to reflect new directory structure
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| version_2/snowflake.yml | Snowflake Native App configuration with duplicate definition_version key |
| version_2/setup.sql | Database setup script with stage grant bug (DOC_SCHEMA typo) |
| version_2/readme.md | Comprehensive deployment guide with file count inconsistencies |
| version_2/manifest.yml | App metadata and configuration |
| version_2/environment.yml | Conda environment specification |
| version_1/setup.sql | Basic Snowflake infrastructure setup |
| version_1/readme.md | Beginner-friendly guide |
| version_1/app.py | Streamlit application with AI chatbot functionality |
| README.md | Updated main documentation for Snowflake architecture |
| .github/workflows/CI.yml | Updated CI to format version_1 and version_2 directories |
| src/* | All previous source files deleted (frontend, core, entrypoint) |
Comments suppressed due to low confidence (7)
version_2/readme.md:403
- Spelling error: "recieve" should be "receive".
- **Emergency Support**: Email info@aifaq.pro ( might take 1 to 2 days for reply)
version_2/readme.md:462
- The heading is missing a leading hash symbol. It should be "## Quick Start Summary" to maintain consistent heading levels with the rest of the document.
## Quick Start Summary
version_2/readme.md:18
- The file path formatting is inconsistent between line 9 (showing 5 files) and line 12-17 (showing 7 files in the tree). The comment on line 9 mentions "5 essential files" but the tree structure lists 6 files. This discrepancy should be corrected.
Your deployment package contains 5 essential files:
aifaq-pro-app/version_2/
├── app_version2.py # Main Streamlit application (our provided code)
├── manifest.yml # App configuration & metadata
├── setup.sql # Database objects & schema setup
├── environment.yml # Python environment & dependencies
└── snowflake.yml # SnowCLI deployment configuration
version_2/readme.md:102
- The comment mentions "7 files" but there are only 5 distinct files referenced in the PUT commands (aifaq_app.py, manifest.yml, setup.sql, environment.yml, snowflake.yml). The LICENSE and requirements.txt files mentioned in line 100-101 don't match the files listed in the File Structure Overview.
3. Upload all 7 files using the **+ Files** button
Or use SQL:
```sql
-- Stage each file
PUT file:///path/to/aifaq_app.py @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/manifest.yml @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/setup.sql @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/environment.yml @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/snowflake.yml @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/requirements.txt @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
PUT file:///path/to/LICENSE @AIFAQ_PRO_PKG.stage/1.0.0/ OVERWRITE=TRUE;
**version_2/readme.md:139**
* References to "7 files" are inconsistent with the actual file structure. Line 139 mentions "Drag-and-drop all 7 files" but the documentation only shows 5-6 core files in the File Structure section.
- Drag-and-drop all 7 files
**version_1/app.py:3**
* Import of 're' is not used.
import uuid, re, datetime as dt
**version_1/app.py:5**
* Import of 'io' is not used.
import io
</details>
---
💡 <a href="/hyperledger-labs/aifaq/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
| f"SELECT DOC_ID, FILENAME, FILE_TYPE, FILE_SIZE, UPLOADED_AT FROM {DOCS_TBL} ORDER BY UPLOADED_AT DESC" | ||
| ).to_pandas() | ||
| return session.sql(f"SELECT DOC_ID, FILENAME, FILE_TYPE, FILE_SIZE, UPLOADED_AT FROM {DOCS_TBL} ORDER BY UPLOADED_AT DESC").to_pandas() | ||
| except: |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except block directly handles BaseException.
| messages.append({"role": "user", "content": r["QUERY_TEXT"]}) | ||
| messages.append({"role": "assistant", "content": r["RESPONSE_TEXT"]}) | ||
| return messages | ||
| except: |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except block directly handles BaseException.
| except Exception: | ||
| pass |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except Exception: | |
| pass | |
| except Exception as e: | |
| st.error(f"Error loading chat sessions: {e}") |
023d6bf to
07faff4
Compare
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram <96161233+Jayaram007@users.noreply.github.com>
This PR addresses minor typos and resolves code indentation issues for cleaner, more maintainable code.